@extends('admin.layouts.index')
@section('title', '外链列表')

@section('content')

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <div style="overflow-x: scroll;">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th scope="col">ID</th>
                                <th scope="col">小程序名称</th>
                                <th scope="col">用户昵称</th>
                                <th scope="col">状态</th>
                                <th scope="col">使用类型</th>
                                <th scope="col">时间</th>
                                <th scope="col">消息</th>
                            </tr>
                        </thead>
                        <tbody>
                            @forelse($miniappsnotices as $miniappsnotice)
                            <tr>
                                <td>{{ $miniappsnotice->id }}</td>
                                <td><a href="{{ url('/admin/miniapp/miniapp_list_update',['appid'=>$miniappsnotice->appid]) }}" target="_blank">{{ $miniappsnotice->name }}</a></td>
                                <td><a href="{{ url('/admin/users/users_detial',['users_id'=>$miniappsnotice->users_id]) }}" target="_blank">{{ $miniappsnotice->nike }}</a></td>
                                @if($miniappsnotice->status == 1)
                                <td class="text-warning">私有</td>
                                @else
                                <td class="text-success">公用</td>
                                @endif

                                @if($miniappsnotice->type == 1)
                                <td>通用</td>
                                @elseif($miniappsnotice->type == 2)
                                <td>公众号专业</td>
                                @elseif($miniappsnotice->type == 3)
                                <td>二维码专用</td>
                                @elseif($miniappsnotice->type == 4)
                                <td>客服专用</td>
                                @elseif($miniappsnotice->type == 5)
                                <td>点击版专用</td>
                                @else
                                <td>免费用户使用</td>
                                @endif
                                <td>{{ $miniappsnotice->created_at }}</td>
                                <td>{{ $miniappsnotice->message }}</td>
                            </tr>
                            @empty
                            <tr>
                                <td colspan="7">当前暂无日志！</td>
                            </tr>
                            @endforelse
                        </tbody>
                    </table>

                    <div class="pagination-container">
                        {!! $miniappsnotices->render() !!}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
